<template>
  <div class="h-card" :style="{ width: width }">
    <div class="card-title" v-show="title">{{ title }}</div>
    <div class="body">
      <slot></slot>
    </div>
  </div>
</template>
<script>
export default {
  props: {
    title: {
      type: String,
      default: "",
    },
    width: {
      type: String,
      default: "26.041667vw",
    },
  },
};
</script>
<style lang="scss" scoped>
.h-card {
  padding: 10px 20px;
  margin: 10px;
  box-shadow:
    rgba(0, 0, 0, 0.25) 0px -1px 1px,
    rgba(0, 0, 0, 0.25) 0px 2px 2px,
    rgba(255, 255, 255, 0.1) 0px 0px 0px 2px inset;
  border-radius: 10px;
  .card-title {
    height: 40px;
    line-height: 40px;
    font-size: 25px;
    border-bottom: 1px solid #a4a4a4;
    color: #bbb;
  }
  .body {
    height: calc(100% - 40px);
    padding-top: 10px;
    overflow: auto;
  }
}
</style>
